package com.crm.newdao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DAOFactory {

	private static ApplicationContext daoCtx;
	public static ApplicationContext  getInstance(){
		if(daoCtx==null){
			daoCtx=new ClassPathXmlApplicationContext("crmdao-appcontext.xml");	
		}
		return daoCtx;
	}
	public static ClientdetSupportDao getClientdetDao(){
		return (ClientdetSupportDao)DAOFactory.getInstance().getBean("clientDao");
	}
}
